/**
 * 
 */
package com.gr.staffpm.widget.dialog.upload;

import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.form.upload.FileUpload;


/**
 * @author Graham Rhodes 17 Apr 2011 19:25:10
 */
public abstract class AjaxUploadDialog extends ModalWindow {

    private static final long serialVersionUID = 1L;

    public AjaxUploadDialog(String id) {
        super(id);
        setInitialHeight(100);
        setInitialWidth(600);

        setTitle("Please choose new assignee.");

        setContent(new FileUploadPanel(getContentId()) {

            private static final long serialVersionUID = 1L;

            @Override
            public void onSubmit(FileUpload fileUpload) {
                AjaxUploadDialog.this.onSubmit(fileUpload);
            }

        });
    }

    protected abstract void onSubmit(FileUpload fileUpload);

}
